package com.blog.controller;

import com.blog.pojo.Chat;
import com.blog.service.impl.ChatServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class ChatController {
    @Resource(name = "chatService")
    private ChatServiceImpl chatService;

    @RequestMapping("/findChats")
    public List<Chat> findChats() {
        return chatService.findChats();
    }
}
